3.102 \(\int \frac{x^5 (A+B x^2)}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=133 \[ \frac{\left (-a B c-A b c+b^2 B\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}+\frac{\left (2 a A c^2-3 a b B c-A b^2 c+b^3 B\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^3 \sqrt{b^2-4 a c}}-\frac{x^2 (b B-A c)}{2 c^2}+\frac{B x^4}{4 c} \]

[Out]

-((b*B - A*c)*x^2)/(2*c^2) + (B*x^4)/(4*c) + ((b^3*B - A*b^2*c - 3*a*b*B*c + 2*a*A*c^2)*ArcTanh[(b + 2*c*x^2)/
Sqrt[b^2 - 4*a*c]])/(2*c^3*Sqrt[b^2 - 4*a*c]) + ((b^2*B - A*b*c - a*B*c)*Log[a + b*x^2 + c*x^4])/(4*c^3)

________________________________________________________________________________________

Rubi [A]  time = 0.206724, antiderivative size = 133, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {1251, 800, 634, 618, 206, 628} \[ \frac{\left (-a B c-A b c+b^2 B\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}+\frac{\left (2 a A c^2-3 a b B c-A b^2 c+b^3 B\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^3 \sqrt{b^2-4 a c}}-\frac{x^2 (b B-A c)}{2 c^2}+\frac{B x^4}{4 c} \]

Antiderivative was successfully verified.

[In]

Int[(x^5*(A + B*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

-((b*B - A*c)*x^2)/(2*c^2) + (B*x^4)/(4*c) + ((b^3*B - A*b^2*c - 3*a*b*B*c + 2*a*A*c^2)*ArcTanh[(b + 2*c*x^2)/
Sqrt[b^2 - 4*a*c]])/(2*c^3*Sqrt[b^2 - 4*a*c]) + ((b^2*B - A*b*c - a*B*c)*Log[a + b*x^2 + c*x^4])/(4*c^3)

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
 IntegerQ[(m - 1)/2]

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{x^5 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{x^2 (A+B x)}{a+b x+c x^2} \, dx,x,x^2\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (-\frac{b B-A c}{c^2}+\frac{B x}{c}+\frac{a (b B-A c)+\left (b^2 B-A b c-a B c\right ) x}{c^2 \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )\\ &=-\frac{(b B-A c) x^2}{2 c^2}+\frac{B x^4}{4 c}+\frac{\operatorname{Subst}\left (\int \frac{a (b B-A c)+\left (b^2 B-A b c-a B c\right ) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 c^2}\\ &=-\frac{(b B-A c) x^2}{2 c^2}+\frac{B x^4}{4 c}+\frac{\left (b^2 B-A b c-a B c\right ) \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^3}-\frac{\left (b^3 B-A b^2 c-3 a b B c+2 a A c^2\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^3}\\ &=-\frac{(b B-A c) x^2}{2 c^2}+\frac{B x^4}{4 c}+\frac{\left (b^2 B-A b c-a B c\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}+\frac{\left (b^3 B-A b^2 c-3 a b B c+2 a A c^2\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c^3}\\ &=-\frac{(b B-A c) x^2}{2 c^2}+\frac{B x^4}{4 c}+\frac{\left (b^3 B-A b^2 c-3 a b B c+2 a A c^2\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^3 \sqrt{b^2-4 a c}}+\frac{\left (b^2 B-A b c-a B c\right ) \log \left (a+b x^2+c x^4\right )}{4 c^3}\\ \end{align*}

Mathematica [A]  time = 0.060516, size = 126, normalized size = 0.95 \[ \frac{\frac{2 \left (-2 a A c^2+3 a b B c+A b^2 c+b^3 (-B)\right ) \tan ^{-1}\left (\frac{b+2 c x^2}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}+\left (-a B c-A b c+b^2 B\right ) \log \left (a+b x^2+c x^4\right )+2 c x^2 (A c-b B)+B c^2 x^4}{4 c^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^5*(A + B*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

(2*c*(-(b*B) + A*c)*x^2 + B*c^2*x^4 + (2*(-(b^3*B) + A*b^2*c + 3*a*b*B*c - 2*a*A*c^2)*ArcTan[(b + 2*c*x^2)/Sqr
t[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + (b^2*B - A*b*c - a*B*c)*Log[a + b*x^2 + c*x^4])/(4*c^3)

________________________________________________________________________________________

Maple [B]  time = 0.005, size = 261, normalized size = 2. \begin{align*}{\frac{B{x}^{4}}{4\,c}}+{\frac{A{x}^{2}}{2\,c}}-{\frac{bB{x}^{2}}{2\,{c}^{2}}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) Ab}{4\,{c}^{2}}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) aB}{4\,{c}^{2}}}+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ){b}^{2}B}{4\,{c}^{3}}}-{\frac{aA}{c}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+{\frac{3\,abB}{2\,{c}^{2}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+{\frac{A{b}^{2}}{2\,{c}^{2}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{{b}^{3}B}{2\,{c}^{3}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^5*(B*x^2+A)/(c*x^4+b*x^2+a),x)

[Out]

1/4*B*x^4/c+1/2/c*A*x^2-1/2/c^2*b*B*x^2-1/4/c^2*ln(c*x^4+b*x^2+a)*A*b-1/4/c^2*ln(c*x^4+b*x^2+a)*a*B+1/4/c^3*ln
(c*x^4+b*x^2+a)*b^2*B-1/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*a*A+3/2/c^2/(4*a*c-b^2)^(1/2
)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*a*b*B+1/2/c^2/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*
A*b^2-1/2/c^3/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b^3*B

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(B*x^2+A)/(c*x^4+b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.69731, size = 896, normalized size = 6.74 \begin{align*} \left [\frac{{\left (B b^{2} c^{2} - 4 \, B a c^{3}\right )} x^{4} - 2 \,{\left (B b^{3} c + 4 \, A a c^{3} -{\left (4 \, B a b + A b^{2}\right )} c^{2}\right )} x^{2} +{\left (B b^{3} + 2 \, A a c^{2} -{\left (3 \, B a b + A b^{2}\right )} c\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c +{\left (2 \, c x^{2} + b\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) +{\left (B b^{4} + 4 \,{\left (B a^{2} + A a b\right )} c^{2} -{\left (5 \, B a b^{2} + A b^{3}\right )} c\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (b^{2} c^{3} - 4 \, a c^{4}\right )}}, \frac{{\left (B b^{2} c^{2} - 4 \, B a c^{3}\right )} x^{4} - 2 \,{\left (B b^{3} c + 4 \, A a c^{3} -{\left (4 \, B a b + A b^{2}\right )} c^{2}\right )} x^{2} + 2 \,{\left (B b^{3} + 2 \, A a c^{2} -{\left (3 \, B a b + A b^{2}\right )} c\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{{\left (2 \, c x^{2} + b\right )} \sqrt{-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) +{\left (B b^{4} + 4 \,{\left (B a^{2} + A a b\right )} c^{2} -{\left (5 \, B a b^{2} + A b^{3}\right )} c\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (b^{2} c^{3} - 4 \, a c^{4}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(B*x^2+A)/(c*x^4+b*x^2+a),x, algorithm="fricas")

[Out]

[1/4*((B*b^2*c^2 - 4*B*a*c^3)*x^4 - 2*(B*b^3*c + 4*A*a*c^3 - (4*B*a*b + A*b^2)*c^2)*x^2 + (B*b^3 + 2*A*a*c^2 -
 (3*B*a*b + A*b^2)*c)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^4 + 2*b*c*x^2 + b^2 - 2*a*c + (2*c*x^2 + b)*sqrt(b^2 - 4*
a*c))/(c*x^4 + b*x^2 + a)) + (B*b^4 + 4*(B*a^2 + A*a*b)*c^2 - (5*B*a*b^2 + A*b^3)*c)*log(c*x^4 + b*x^2 + a))/(
b^2*c^3 - 4*a*c^4), 1/4*((B*b^2*c^2 - 4*B*a*c^3)*x^4 - 2*(B*b^3*c + 4*A*a*c^3 - (4*B*a*b + A*b^2)*c^2)*x^2 + 2
*(B*b^3 + 2*A*a*c^2 - (3*B*a*b + A*b^2)*c)*sqrt(-b^2 + 4*a*c)*arctan(-(2*c*x^2 + b)*sqrt(-b^2 + 4*a*c)/(b^2 -
4*a*c)) + (B*b^4 + 4*(B*a^2 + A*a*b)*c^2 - (5*B*a*b^2 + A*b^3)*c)*log(c*x^4 + b*x^2 + a))/(b^2*c^3 - 4*a*c^4)]

________________________________________________________________________________________

Sympy [B]  time = 8.12853, size = 619, normalized size = 4.65 \begin{align*} \frac{B x^{4}}{4 c} + \left (- \frac{\sqrt{- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{A b c + B a c - B b^{2}}{4 c^{3}}\right ) \log{\left (x^{2} + \frac{A a b c + 2 B a^{2} c - B a b^{2} + 8 a c^{3} \left (- \frac{\sqrt{- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{A b c + B a c - B b^{2}}{4 c^{3}}\right ) - 2 b^{2} c^{2} \left (- \frac{\sqrt{- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{A b c + B a c - B b^{2}}{4 c^{3}}\right )}{- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}} \right )} + \left (\frac{\sqrt{- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{A b c + B a c - B b^{2}}{4 c^{3}}\right ) \log{\left (x^{2} + \frac{A a b c + 2 B a^{2} c - B a b^{2} + 8 a c^{3} \left (\frac{\sqrt{- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{A b c + B a c - B b^{2}}{4 c^{3}}\right ) - 2 b^{2} c^{2} \left (\frac{\sqrt{- 4 a c + b^{2}} \left (- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}\right )}{4 c^{3} \left (4 a c - b^{2}\right )} - \frac{A b c + B a c - B b^{2}}{4 c^{3}}\right )}{- 2 A a c^{2} + A b^{2} c + 3 B a b c - B b^{3}} \right )} - \frac{x^{2} \left (- A c + B b\right )}{2 c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**5*(B*x**2+A)/(c*x**4+b*x**2+a),x)

[Out]

B*x**4/(4*c) + (-sqrt(-4*a*c + b**2)*(-2*A*a*c**2 + A*b**2*c + 3*B*a*b*c - B*b**3)/(4*c**3*(4*a*c - b**2)) - (
A*b*c + B*a*c - B*b**2)/(4*c**3))*log(x**2 + (A*a*b*c + 2*B*a**2*c - B*a*b**2 + 8*a*c**3*(-sqrt(-4*a*c + b**2)
*(-2*A*a*c**2 + A*b**2*c + 3*B*a*b*c - B*b**3)/(4*c**3*(4*a*c - b**2)) - (A*b*c + B*a*c - B*b**2)/(4*c**3)) -
2*b**2*c**2*(-sqrt(-4*a*c + b**2)*(-2*A*a*c**2 + A*b**2*c + 3*B*a*b*c - B*b**3)/(4*c**3*(4*a*c - b**2)) - (A*b
*c + B*a*c - B*b**2)/(4*c**3)))/(-2*A*a*c**2 + A*b**2*c + 3*B*a*b*c - B*b**3)) + (sqrt(-4*a*c + b**2)*(-2*A*a*
c**2 + A*b**2*c + 3*B*a*b*c - B*b**3)/(4*c**3*(4*a*c - b**2)) - (A*b*c + B*a*c - B*b**2)/(4*c**3))*log(x**2 +
(A*a*b*c + 2*B*a**2*c - B*a*b**2 + 8*a*c**3*(sqrt(-4*a*c + b**2)*(-2*A*a*c**2 + A*b**2*c + 3*B*a*b*c - B*b**3)
/(4*c**3*(4*a*c - b**2)) - (A*b*c + B*a*c - B*b**2)/(4*c**3)) - 2*b**2*c**2*(sqrt(-4*a*c + b**2)*(-2*A*a*c**2
+ A*b**2*c + 3*B*a*b*c - B*b**3)/(4*c**3*(4*a*c - b**2)) - (A*b*c + B*a*c - B*b**2)/(4*c**3)))/(-2*A*a*c**2 +
A*b**2*c + 3*B*a*b*c - B*b**3)) - x**2*(-A*c + B*b)/(2*c**2)

________________________________________________________________________________________

Giac [A]  time = 1.21063, size = 170, normalized size = 1.28 \begin{align*} \frac{B c x^{4} - 2 \, B b x^{2} + 2 \, A c x^{2}}{4 \, c^{2}} + \frac{{\left (B b^{2} - B a c - A b c\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, c^{3}} - \frac{{\left (B b^{3} - 3 \, B a b c - A b^{2} c + 2 \, A a c^{2}\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(B*x^2+A)/(c*x^4+b*x^2+a),x, algorithm="giac")

[Out]

1/4*(B*c*x^4 - 2*B*b*x^2 + 2*A*c*x^2)/c^2 + 1/4*(B*b^2 - B*a*c - A*b*c)*log(c*x^4 + b*x^2 + a)/c^3 - 1/2*(B*b^
3 - 3*B*a*b*c - A*b^2*c + 2*A*a*c^2)*arctan((2*c*x^2 + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*c^3)